package com.lianxi;

import com.lianxi.pojo.User;
import com.lianxi.util.DateUtil;
import com.lianxi.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


public class TestME {

    private static Logger logger = LoggerFactory.getLogger(TestME.class);

    private static User testuser;

    //类型
    public static final HashMap<String, String> DOC_TYPE_MAP = new HashMap();


    public static void main(String[] args) {

//        TestME.testMethod("qihap");
        ArrayList<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");

        list.set(1, "?" + "d");


        int length = "https://yxxxfile.dahe.cn/yxxxfile-1652343429270-mmexport1650974261827.png".split(",").length;
        System.out.println(length);

        String join = String.join("", list);
        System.out.println(join);
        for (Object o : list) {
            System.out.println(o);
        }


        DOC_TYPE_MAP.put("1", "规章");
        DOC_TYPE_MAP.put("2", "行政规范性文件");
        DOC_TYPE_MAP.put("3", "其他");

        logger.info("CECECE");
        System.out.println(StringUtil.isBlank(DOC_TYPE_MAP.get(null == null ? "" : String.valueOf(1))));
        System.out.println(StringUtil.isBlank(DOC_TYPE_MAP.get(String.valueOf(" "))));


        LocalDateTime localDateTime = LocalDateTime.of(2021, 12, 21, 0, 0, 0);
        long l = localDateTime.toInstant(ZoneOffset.of("+8")).toEpochMilli();
        Date date = new Date(l);
        System.out.println(DateUtil.format(date,null));



    }


    public static User getUser() {
//        testuser = new User(1,"齐浩",18);
        return testuser;
    }

    public static void testMethod(String name) {
        testuser.setName(name);
        System.out.println(testuser);
    }


}
